import org.junit.Test;

import java.util.Random;

/**
 * ForLoop..
 *
 * @author Lizhong
 * @date 2019/4/10
 */
public class ForLoop {
    @Test
    public void test() {
        Random random = new Random(66);
        // 跳出哪一层for 或者继续 continue
        position:
        for (; ; ) {

            int i = random.nextInt(121);
            System.out.println(i);
            if (i % 2 == 0) {
                break position;
            } else {
                continue position;
            }
        }
        System.out.println("over");
    }
}
